#pragma once
#include <shlobj.h>
#include <tchar.h>

class CFolderSelect
{
public:
	void Init(HWND hwnd, LPCTSTR pszInitFolder, LPCTSTR title = NULL);
	BOOL Select();
	TCHAR * GetSelectedFolder()
	{
		return szPath;
	}
	void SetSelectedFolder(LPCTSTR szFolder)
	{
		_tcscpy_s(szPath, MAX_PATH, szFolder);
	}
private:
	BROWSEINFO bi;
	TCHAR szPath[MAX_PATH];
};